This function converts a temperature value from one into another unit by using an appropriate given mode parameter.
| LGF_ConvertTemperature (FC) | ||||||||
|---|---|---|---|---|---|---|---|---|
| Int | mode | Ret_Val | Real | |||||
| Real | value | error | Bool | |||||
| status | Word | |||||||
| Identifier | Data type | Description |
|---|---|---|
| mode | Int | 1: Celsius to Fahrenheit, 2: Fahrenheit to Celsius, 3: Celsius to Kelvin, 4: Kelvin to Celsius, 5: Fahrenheit to Kelvin, 6: Kelvin in Fahrenheit, 7: Rankine to Kelvin, 8: Kelvin to Rankine |
| value | Real | Temperature value to be converted |
| Identifier | Data type | Description |
|---|---|---|
| Ret_Val | Real | Converted temperature result |
| error | Bool | FALSE: No error TRUE: An error occurred during the execution of the FB |
| status | Word | 16#0000-16#7FFF: Status of the FB 16#8000-16#FFFF: Error identification (see following Table) |
| Code / Value | Identifier / Description |
|---|---|
| 16#8200 | ERR_WRONG_MODE Error: Incorrect mode on input “mode”, see description of the input parameters |
| Version & Date | Change description | |
|---|---|---|
| 01.00.00 | Siemens Industry Online Support | |
| 19.08.2015 | First released version | |
| 01.00.01 | Siemens Industry Online Support | |
| 02.01.2017 | Upgrade: TIA Portal V14 Update 1 | |
| 01.00.02 | Siemens Industry Online Support | |
| 17.08.2018 | Upgrade: TIA V15 Update 2 | |
| 01.00.03 | Siemens Industry Online Support | |
| 23.11.2018 | Upgrade: TIA V15.1 | |
| 02.00.00 | Simatic Systems Support | |
| 16.12.2018 | Rename from "LGF_TemperatureConvert" to "LGF_ConvertTemperature" to start with the verb include the Rankine conversion Code refactoring, regions, commends and constants | |
| 03.00.00 | Simatic Systems Support | |
| 23.04.2020 | Set version to V3.0.0 harmonize the version of the whole library | |
| 03.00.01 | Simatic Systems Support | |
| 22.02.2021 | Insert documentation | |